package com.snopy.designPattern.structure.composite;

import lombok.extern.slf4j.Slf4j;

/**
 * @author snopy
 * @version 1.0.0
 * @classname ComposizePatternDemo
 * @description
 * @email 77912204@qq.com
 * @date 2022/03/03 10:48
 */
@Slf4j
public class ComposizePatternDemo {
    public static void main(String[] args) {
        Menu menu = new Menu("1","系统管理",null);
        Menu userManage = new Menu("2","用户管理","/rest/user");
        userManage.addMenu(new Menu("5","测试","/rest/test"));
        menu.addMenu(userManage);
        menu.addMenu(new Menu("3","角色管理","/rest/role"));
        menu.addMenu(new Menu("4","权限管理","/rest/auth"));
        log.info("menu:{}",menu.toString());
    }
}
